package com.tsu.mall.common.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author tttttt
 * @since 2023-03-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("bill")
public class Bill implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号
     */
    private String code;

    /**
     * 订单创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 订单总价
     */
    private BigDecimal price;

    /**
     * 用户id
     */
    private Integer memberId;

    /**
     * 订单状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String accountNumber;

    @TableField(exist = false)
    private Integer num;//订单数量

    @TableField(exist = false)
    private BigDecimal sumPrice;//订单总价

    private String payType;//支付类型

    private String serialNumber;//流水号



}
